/*! rws.nl v1.0.0, 27-10-14 */
(function() {
  window.CAROUSEL_PAUSED = true;

  $(function() {
    var prev_md;
    prev_md = $("");
    return $("#nav").on("click dblclick", "li.main-item > a", function(ev) {
      var md;
      if (ev.type === 'click') {
        md = $(this).parent().find(".mega-dropdown");
        prev_md.not(md).removeClass("open");
        prev_md = $(md);
        md.toggleClass("open");
        return ev.preventDefault();
      } else {
        window.location = this.href;
        return false;
      }
    });
  });

  $(function() {
    return $(document.body).on("click", "a.staging-toggle-link", function(ev) {
      $(this).parent().toggleClass("open");
      return ev.preventDefault();
    });
  });

  $(function() {
    return $(document.body).on("click dblclick", "a.dblclick-only", function(ev) {
      if (ev.type === 'click') {
        return ev.preventDefault();
      } else {
        window.location = this.href;
        return false;
      }
    });
  });

}).call(this);
